﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace COFE.Core.Actions
{
    /// <summary>
    /// For actionFunc to report progress.
    /// </summary>
    public interface IWorkProgress
    {
        /// <summary>
        /// The current SimpleWork.
        /// </summary>
        IWork Work { get; }

        /// <summary>
        /// Raise WorkMessage event.
        /// </summary>
        /// <param name="e"></param>
        bool OnWorkMessage(WorkMessageEventArgs e);

        /// <summary>
        /// Raise WorkProgress event.
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        bool OnWorkProgress(WorkProgressEventArgs e);

        /// <summary>
        /// Freeze the thread if the SimpleWork is paused.
        /// </summary>
        void CheckPause();
    }
}
